

function mqlRead(query, callback) {
  jQuery.getJSON(
      "http://localhost:8888/api/service/mqlread?callback=?",
//    "http://api.freebase.com/api/service/mqlread?callback=?",
       {"query": JSON.stringify({"query": query})},   // URL parameter
       function(json) {
         callback(json["result"]);
       });                               // Callback function
}


function mqlWrite(query, callback) {
  jQuery.getJSON(
      "http://localhost:8888/api/service/mqlwrite?callback=?",
//	    "http://api.freebase.com/api/service/mqlread?callback=?",
       {"query": JSON.stringify({"query": query})},   // URL parameter
       function(json) {
         callback(json["result"]);
       });                               // Callback function
}